<!--
 * @Descripttion : 
 * @Autor        : Lilong
 * @Date         : 2022-09-30 10:54:31
 * @LastEditTime : 2022-09-30 11:15:49
 * @FilePath     : \表单控件绑定\v-model和组件\第二种(用于自定义输入组件上)\改变默认的属性名称\不和计算属性一起使用\第一种方式：v-model和defineComponent\APP.vue
-->
// src/APP.vue

<script lang="ts">
  import { defineComponent, ref } from 'vue'
  import CustomInput from './CustomInput.vue'
  
  export default defineComponent({
    name:"APP",
    components: {
      CustomInput
    },
    setup(props, context) {
      const searchText2 = ref('')
  
      return {
        searchText2,
      }
    }
  })
</script>
    
<template>
  <div>
      <custom-input v-model:test="searchText2"></custom-input>
      <div>{{ searchText2 }}</div>
  </div>
</template>